#include <iostream>
#include <cctype>
#include <string>
using namespace std;

int main() {
    string str;
    string ans;
    size_t maxv = 0, len = 0;
    char ch = cin.get();
    while (ch != '\n')
    {
        if (isdigit(ch))
            str += ch;
        else
        {
            len = str.size();
            if (len > maxv)
            {
                maxv = len;
                ans = str;
            }
            str.clear();
        }
        ch = cin.get();
    }
    if (str.size() > maxv)
        ans = str;

    cout << ans << endl;
    return 0;
}